home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
351-375
/
359
/
dice
/
dice.lzh
/
lib
/
string
/
strcmp.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
C/C++ Source or Header
|
1990-03-28
|
317 b
|
28 lines
/*
* STRCMP.C
*
* (c)Copyright 1990, Matthew Dillon, All Rights Reserved
*/
#include <string.h>
typedef unsigned char ubyte;
int
strcmp(s, d)
const char *s;
const char *d;
{
while (*s == *d) {
if (*s == 0)
return(0);
++s;
++d;
}
if ((ubyte)*s < (ubyte)*d)
return(-1);
return(1);
}